package com.company.gas.mapper;


import com.company.gas.pojo.Material;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
/**
 * @author: Li Guangdi
 *
 */
//mybatis的mapper类
@Mapper
@Repository
public interface MaterialMapper {

    List<Material> selectAll();

    Material queryMaterialById(@Param("matId") String matId);

    int addMaterial(@Param(value = "matId") String matId,@Param(value = "matName") String matName,
                    @Param(value = "store") Integer store,
                    @Param(value = "available") Integer available, @Param(value = "flag") Integer flag,
                    @Param(value = "createBy") String createBy, @Param(value = "modifyBy") String modifyBy);

    int updateMaterial(@Param(value = "matId") String matId,@Param(value = "matName") String matName,
                       @Param(value = "store") Integer store,@Param(value = "available") Integer available,
                       @Param(value = "flag") Integer flag,@Param(value = "modifyBy") String modifyBy);

    int deleteMaterial(@Param("matId") String matId);
}
